/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package music;

import java.awt.Graphics;
import music.types.ClefType;
import music.types.MidiNote;

/**
 *
 * @author TJ
 */
public class KeySignature {
    
    private int key;
    private String name;
    public KeySignature(int key) {}
    public KeySignature(String key) {}
    public KeySignature(String name, int key) {
    this.name=name;
    this.key=key;
    }
    private void getKeyByName(String c) {
        if(c.length()==0 || c.length()>2) {}
        if(true){}
        String key="C";
        for(int i=0; i<7; i++) {
            
        }
    } 
    public static KeySignature minorKey() {
        return null;
    }
    public static KeySignature majorKey() {
        return null;
    }
    public String toString() {
        return super.toString();
    }
    public boolean isAccidentalInKey(char c) {
        if(c<'A' || c>'G') {throw new IllegalArgumentException();}
        if(c>0) {
            char tmp='F';
            for(int i=1; i<key; i++) {
                if(c==tmp){return true;}
                tmp=(char)(c+4);
                if(tmp>'G'){tmp-=7;}
            }
        } else if(c<0){
            char tmp='B';
            for(int i=1; i<key; i++) {
                if(c==tmp){return true;}
                tmp=(char)(c-4);
                if(tmp<'A'){tmp+=7;}
            }
        }
        return false;
    }
    public int isSharpOrFlat(MidiNote n) {
        if(true) {
            return -1;
        } else if(true){
            return 1;
        }
        return 0;
    }
    public int renderKey(Graphics g, int bottomLine,SpacingOptions s, ClefType c) {
        return 0;
    }
}
